<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>DDDDDDDooooooooooogggggggggg</title>
    <style type="text/css">
        td {
            border: 2px solid lightblue;
            background-color: azure;
            height: 70px;
            width: 130px;
            margin: 0px;
            text-align: center;
            font-weight: bold;
        }

        table {
            margin: 0 auto;
            border: 1px solid lightblue;
        }

        #dog {
            margin: 0 auto;
            padding-top: 30px;
            height: 550px;
            width: 1000px;
        }

        button {
            height: 50px;
            width: 250px;
            background-color: azure;
            border: 2px solid lightsteelblue;
            font-weight: bold;
        }

        #but {
            height: 500px;
            width: 300px;
            margin: 0 auto;
            margin-top: 50px;
        }

        #nof {
            margin: 0 auto;
            text-align: center;
            height: 50px;
            width: 500px;
            font-weight: bold;
        }
    </style>
    <script>
        var times = 0;
        var st;
        function fn() {
            times++;
            console.log(times);
            for (let i = 1; i <= 42; i++) {
                var tdObj = document.getElementById('td' + i);
                tdObj.style.backgroundColor = 'azure';
                tdObj.style.fontSize = '16px';
            }
            var num = parseInt(Math.random() * 42 + 1);
            var tdObj = document.getElementById('td' + num);
            tdObj.style.backgroundColor = 'lightgreen';
            tdObj.style.fontSize = '20px';
            if (times >= 42) {
                document.getElementById('nof').innerText = '是你！' + tdObj.innerText;
                clearInterval(st);
                if (num==5) {alert('选我选我选我，我好无聊啊。');}
            }
        }
        function start() {
            times = 0;
            for (let i = 1; i <= 42; i++) {
                var tdObj = document.getElementById('td' + i);
                tdObj.style.backgroundColor = 'azure';
                tdObj.style.fontSize = '16px';
            }
            document.getElementById('nof').innerText = '暗箱操作中.......................................................................................'
            st = setInterval(fn, 100);



        }
    </script>
</head>

<body>
    <div id="dog">
        <div id="nof">让我们开始吧！</div>
        <table cellpadding="0px" cellspacing="0px">
            <tr>
                <td id="td1">郑玮喆</td>
                <td id="td2">庄云</td>
                <td id="td3"> 廖治先</td>
                <td id="td4"> 郑文源</td>
                <td id="td5"> 戴俊锋</td>
                <td id="td6"> 陈昊童</td>
            </tr>
            <tr>
                <td id="td7"> 谢金金</td>
                <td id="td8"> 占志新</td>
                <td id="td9"> 张淑芳</td>
                <td id="td10"> 刘永潘</td>
                <td id="td11"> 廖柏成</td>
                <td id="td42">郑宗帅</td>
            </tr>
            <tr>
                <td id="td12"> 李韦峰</td>
                <td id="td13"> 吴欣燕</td>
                <td id="td14"> 陈梅香</td>
                <td id="td15"> 陈立智</td>
                <td id="td16"> 袁贵森</td>
                <td id="td17"> 赵浩敏</td>
            </tr>
            <tr>
                <td id="td18"> 林世涛</td>
                <td id="td19"> 罗启恒</td>
                <td id="td20"> 卢国建</td>
                <td id="td21"> 黄柱菘</td>
                <td id="td22"> 陈鹏</td>
                <td id="td23"> 张耀仁</td>
            </tr>
            <tr>
                <td id="td24"> 陈华伟</td>
                <td id="td25"> 张正豪</td>
                <td id="td26"> 韦仲晓</td>
                <td id="td27"> 黄富贵</td>
                <td id="td28"> 陆建锋</td>
                <td id="td29"> 曾德森</td>
            </tr>
            <tr>
                <td id="td30"> 吴文龙</td>
                <td id="td31"> 陆利群</td>
                <td id="td32"> 黄雄</td>
                <td id="td33"> 王世财</td>
                <td id="td34"> 张先杰</td>
                <td id="td35"> 胡基耀</td>
            </tr>
            <tr>
                <td id="td36"> 马鑫涛</td>
                <td id="td37"> 李涛</td>
                <td id="td38"> 杨凌翔</td>
                <td id="td39"> 罗此东</td>
                <td id="td40"> 唐皓颖</td>
                <td id="td41"> 白婉婷</td>
            </tr>
        </table>
    </div>
    <div id="but">
        <button type="button" onclick="start()">单击以开始</button>
    </div>

















































    <p>海外存知己，天涯若比邻。</p>
</body>

</html>